package com.tdkj.model.website;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * XnkyWebsiteParams entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "website_website_params")
public class BeanWebsiteParam extends BaseEntity {

	// Fields
	private String paramname;
	private String keywords;
	private Set<BeanWebsiteOnline> websiteOnlines = new HashSet<BeanWebsiteOnline>(0);

	// Constructors

	/** default constructor */
	public BeanWebsiteParam() {
		
	}
	/** default constructor */
	public BeanWebsiteParam(long id) {
		this.setId(id);
	}

	/** full constructor */
	public BeanWebsiteParam(long id,String keywords,
			Set<BeanWebsiteOnline> websiteOnlines) {
		this.setId(id);
		this.keywords = keywords;
		this.websiteOnlines = websiteOnlines;
	}
	
	@Column(name = "paramname", length = 40)
	public String getParamname() {
		return paramname;
	}
	public void setParamname(String paramname) {
		this.paramname = paramname;
	}

	@Column(name = "keywords", length = 40)
	public String getKeywords() {
		return this.keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "websiteParam")
	public Set<BeanWebsiteOnline> getWebsiteOnlines() {
		return this.websiteOnlines;
	}

	public void setWebsiteOnlines(Set<BeanWebsiteOnline> websiteOnlines) {
		this.websiteOnlines = websiteOnlines;
	}

}